package com.zjd.swing.browser;

import javax.swing.*;
import java.awt.*;

/**
 * @Description: 控制器
 * @Author: sobey
 * @Email: sobey178@163.com
 * @Date: 2022/3/28 10:38
 */
public class MyBrowserControllerJFrame extends JFrame {
    public MyBrowserControllerJFrame(String title) throws HeadlessException {
        super(title);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Dimension dimension = new Dimension(1000, 800);
        setMinimumSize(dimension);
        setMaximumSize(dimension);
        JTabbedPane tabbedPane=new JTabbedPane();
        tabbedPane.addTab("管理界面",new MyBrowserControllerJPanel());
        add(tabbedPane,BorderLayout.CENTER);
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        setLocationByPlatform(true);
        setVisible(true);
    }
    public void openBrowser(String title,String url){
        new MyBrowserJFrame(title,url);
    }
}
